/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package simhya.model.stochastic;

import java.util.ArrayList;
import simhya.model.store.*;
import simhya.model.transition.Transition;
import simhya.model.transition.AtomicReset;
import simhya.model.transition.TType;

/**
 *
 * @author Luca
 */
public interface StochasticModel {
    
    public void setStore(Store store);
    public int addTransition(Transition t);
    public boolean isInitialized();

    public int getNumberOfTransitions();
    public int getNumberOfStochasticTransitions();
    public int[] getListOfStochasticTransitionID();
    public int getNumberOfInstantaneousTransitions();
    public int[] getListOfInstantaneousTransitionsID();
    public int getNumberOfTimedTransitions();
    public int[] getListOfTimedTransitionsID();

    public boolean evaluateGuard(int transitionID);
    public boolean getCurrentGuardStatus(int transitionID);
    public double computeRate(int transitionID);
    public double computeNextFiringTime(int transitionID, double time);
    public void execute(int transitionID);
    public boolean isStopping(int transitionID);
    public boolean isStoppingAfterDelay(int transitionID);
    public TType getTransitionType(int transitionID);
    public String getTransitionName(int transitionID);

     public void finalizeInitialization();
    public Integer[] getListOfUpdatedGuards(int transitionID);
    public Integer[] getListOfUpdatedRates(int transitionID);
    public Integer[] getListOfUpdatedFiringTimes(int transitionID);


    public ArrayList<Integer> getIdOfVariables(ArrayList<String> list);
    public double[] getVariablesValues();
    public ArrayList<String> getNameOfAllVariables();
    public ArrayList<String> getNameOfAllParameters();
    public String getName();

    public void setValueOfVariable(String var, double value);
    public void setValueOfParameter(String param, double value);
    public void resetToInitialState();

    public Store getStore();
    public Predicate[] getTransitionGuards();
    public Function[] getTransitionRates();
    public TType[] getTransitionTypes();
    public String[] getTransitionEvents();
    public Function[] getTransitionTimedActivations();
    public Function[] getTransitionDelays();
    public AtomicReset[][] getTransitionResets();
    public Predicate[] getTransitionDelayedGuards();
    public AtomicReset[][] getTransitionDelayedResets();
    public boolean[] getTransitionStoppingStatus();
    public boolean[] getTransitionStoppingStatusAfterDelay(); 
}
